Input method, device, and electronic apparatus

ABSTRACT

An input method, device and electronic apparatus are provided. The input method includes acquiring text information at an input cursor position, where the text information includes above text information located before the input cursor and/or below text information located after the input cursor; extracting keywords from the text information; searching through associative candidate lexicons of the keywords to obtain an enter-on-screen candidate word queue at the input cursor position; outputting the enter-on-screen candidate word queue. By acquiring the text information at the input cursor position and determining the enter-on-screen candidate word queue based on the keywords in the text information, embodiments of the present disclosure solve the issue in existing techniques that after the input cursor changes it position, no enter-on-screen candidate word may be provided by association because no reliable enter-on-screen entry is obtained.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application claims priority of Chinese Patent Application No.201410455924.0, entitled “INPUT METHOD, DEVICE, AND ELECTRONICAPPARATUS”, filed with the State Intellectual Property Office of P. R.China on Sep. 9, 2014, the entire contents of all of which areincorporated herein by reference.

FIELD OF THE DISCLOSURE

The present disclosure generally relates to the field of communicationtechnology and, more particularly, relates to an input method, a device,and an electronic apparatus.

BACKGROUND

Pinyin input method is one of the simplest Chinese character inputmethods. The development of the Pinyin input method is very fast. Fromthe first generation that mainly relies on word input, that is, a usermay each time input only one Chinese character, the Pinyin input methoddevelops into the second generation that is characterized by phraseinput and has an intelligent frequency-adjustment function. During thisperiod of time, the Pinyin input method mainly relies on the dictionaryof the input method. When the Pinyin input method develops into thethird generation, the user may perform sentence input, sentences notincluded in the dictionary of the input method may also be inputted, andthe word formation function has a great influence on the user inputexperience.

The association function of the input method is an extension of theactive input function of the Pinyin input method. The establishment ofthe association function not only reduces the number of times of useractive input and the number of times of key presses, but also improvesthe intellectuality of the input method. The implementation process ofthe input method includes first obtaining an entry lastly entered onscreen by the user, then inquiring pre-built lexicons such as a systembinary library according to the entry lastly entered on screen to obtainan enter-on-screen candidate word queue, and later outputting theenter-on-screen candidate word queue.

However, the enter-on-screen candidate word queue in the above-describedinput method has to rely on the entry lastly entered on screen. When aninput cursor changes its position, no reliable enter-on-screen entry canbe obtained, such that no enter-on-screen candidate word queue can beprovided at the input cursor position via association. Accordingly, atechnical issue to be solved urgently by those skilled in the art is:how to obtain a reliable enter-on-screen candidate word queue when theinput cursor moves.

BRIEF SUMMARY OF THE DISCLOSURE

The technical issue to be solved by embodiments of the presentdisclosure is to provide an input method, thereby obtaining a reliableenter-on-screen candidate word queue when the input cursor moves.

Correspondingly, embodiments of the present disclosure also provide aninput device and an electronic apparatus so as to ensure theimplementation and application of the above-described method.

To solve the above-described issue, the present disclosure discloses aninput method, including:

acquiring text information at an input cursor position, where the textinformation includes above text information located before the inputcursor and/or below text information located after the input cursor;

extracting keywords from the text information;

searching through associative candidate lexicons of the keywords toobtain an enter-on-screen candidate word queue at the input cursorposition; and

outputting the enter-on-screen candidate word queue.

Further, acquiring the text information at the input cursor positionincludes:

when the input cursor is detected to be inside a text box and a stopduration of text input exceeds a time threshold, acquiring the textinformation at the input cursor position.

Further, acquiring the text information at the input cursor positionincludes:

using a break point of a whole sentence where the input cursor islocated or a text box boundary as a length boundary of the textinformation, and acquiring the text information at the input cursorposition.

Further, searching through the associative candidate lexicons of thekeywords to obtain the enter-on-screen candidate word queue at the inputcursor position includes:

according to a distance relationship between the keywords and the inputcursor and/or an application property that each keyword belongs to,determining language models corresponding to the keywords; and

searching through associative candidate lexicons of the language modelsto obtain the enter-on-screen candidate word queue at the input cursorposition.

Further, according to the distance relationship between the keywords andthe input cursor, determining the language models corresponding to thekeywords includes:

if the number of the keywords is one, when the distance relationshipbetween the keyword and the input cursor is an adjacent relationship,determining the language model corresponding to the keyword to be anadjacent binary language model; when the distance relationship is anon-adjacent relationship, determining the language model correspondingto the keyword to be a remote binary language model;

if the number of the keywords is two, determining the language modelcorresponding to the keywords to be a ternary language model.

Further, before according to the distance relationship between thekeywords and the input cursor, determining the language modelscorresponding to the keywords, the input method further includes:

establishing language models and associative candidate lexicons of thelanguage models, where the language models include the adjacent binarylanguage model, the remote binary language model and the ternarylanguage model; and

establishing the language models and the associative candidate lexiconsof the language models includes:

collecting a training corpus;

extracting a training candidate word and training keywords from thetraining corpus, where the distance relationships between the trainingkeywords and the training candidate word include an adjacentrelationship and a non-adjacent relationship, and the number of thetraining keywords is at least one; and

performing model training on the training candidate word and thetraining keywords to obtain the language models and the associativecandidate lexicons of the language models.

Further, according to the application property that each keyword belongsto, determining the language models corresponding to the keywordsincludes:

according to a user usage habitat feature that the keyword belongs to,determining a user model corresponding to the keyword; or

according to an application field that the keyword belongs to,determining a perpendicular model corresponding to the keyword; or

according to a common vocabulary that the keyword belongs to,determining a common vocabulary language model corresponding to thekeyword; or

according to a topic situation that the keyword belongs to, determininga situation model corresponding to the keyword.

Further, searching through the associative candidate lexicons of thelanguage models to obtain the enter-on-screen candidate word queue atthe input cursor position includes:

when the number of the language models is at least two, determining anenter-on-screen candidate word in the associative candidate lexicon ofeach language model, respectively;

according to a pre-determined weight of each language model, linearlysuperimposing and merging the enter-on-screen candidate words based onthe weights; and

sorting the merged enter-on-screen candidate words based on the weightsfrom high to low to obtain the enter-on-screen candidate word queue atthe input cursor position.

Further, before outputting the enter-on-screen candidate word queue, theinput method also includes:

according to the topic situation at the input cursor position,re-ordering the enter-on-screen candidate word queue;

outputting the enter-on-screen candidate word queue includes:

outputting a re-ordered enter-on-screen candidate word queue.

Further, according to the topic situation at the input cursor position,re-ordering the enter-on-screen candidate word queue, includes:

according to the number of the keywords that fit each situation featuretag and the sum of possibilities of the keywords fitting each situationfeature tag, determining a feature score of each situation feature tag;

according to the feature score of each situation feature tag, sortingthe situation feature tags from high to low; and

according to an order of the situation feature tags, re-ordering theenter-on-screen candidate word queue, where the enter-on-screencandidate words in the enter-on-screen candidate word queue all haveeach own situation feature tag.

The present disclosure also discloses an input device, including:

a text acquisition unit, configured to acquire text information at aninput cursor position, where the text information includes above textinformation before an input cursor and/or below text information afterthe input cursor;

a keyword extraction unit, configured to extract keywords from the textinformation;

a queue acquisition unit, configured to search through associativecandidate lexicons of the keywords to obtain an enter-on-screencandidate word queue at the input cursor position; and

a queue output unit, configured to output the enter-on-screen candidateword queue.

Further, the text acquisition unit is specifically configured to, whenthe input cursor is detected to be inside a text box and a stop durationof text input exceeds a time threshold, acquire the text information atthe input cursor position.

Further, the text acquisition unit is specifically configured to, usinga break point of a whole sentence where the input cursor is located or atext box boundary as a length boundary of the text information, acquirethe text information at the input cursor position.

Further, the queue acquisition unit includes:

a model determination sub-unit, configured to, according to a distancerelationship between the keywords and the input cursor and/or anapplication property that each keyword belongs to, determine languagemodels corresponding to the keywords; and

a queue acquisition sub-unit, configured to search through associativecandidate lexicons of the language models to obtain the enter-on-screencandidate word queue at the input cursor position.

Further, the model determination sub-unit is specifically configured to,if the number of the keywords is one, when the distance relationshipbetween the keyword and the input cursor is an adjacent relationship,determine the language model corresponding to the keyword to be anadjacent binary language model; when the distance relationship is anon-adjacent relationship, determine the language model corresponding tothe keyword to be a remote binary language model; and if the number ofkeywords are two, determine the language model corresponding to thekeywords to be a ternary language model.

Further, the queue acquisition unit further includes:

a model establishment sub-unit, configured to, before the modeldetermination sub-unit determines the language models corresponding tothe keywords, establish the language models and the associativecandidate lexicons of the language models, where the language modelsinclude the adjacent binary language model, the remote binary languagemodel, and the ternary language model;

the model establishment sub-unit includes:

a collection sub-unit, configured to collect a training corpus;

an extraction sub-unit, configured to extract a training candidate wordand training keywords from the training corpus, where the distancerelationship between the training keywords and the training candidateword includes an adjacent relationship and a non-adjacent relationship,and the number of the training keywords is at least one; and

a training sub-unit, configured to perform model training on thetraining candidate word and the training keywords to obtain the languagemodels and the associative candidate lexicons of the language models.

Further, the model determination sub-unit is specifically configured to,according to an user usage habitat feature that the keyword belongs to,determine an use model corresponding to the keyword; or, according to anapplication field that the keyword belongs to, determine a perpendicularmodel corresponding to the keyword; or, according to a common vocabularythat the keyword belongs to, determine a common vocabulary languagemodel corresponding to the keyword; or, according to a topic situationthat the keyword belongs to, determine a situation model correspondingto the keyword.

Further, the queue acquisition sub-unit includes:

a determination sub-unit, configured to when the number of languagemodels is at least two, determine an enter-on-screen candidate word inthe associative candidate lexicon of each language model, respectively;

a merging sub-unit, configured to, according to a pre-determined weightof each language model, linearly superimpose and merge theenter-on-screen candidate words based on the weights; and

a sorting sub-unit, configured to sort the merged enter-on-screencandidate words based on the weights from high to low to obtain theenter-on-screen candidate word queue at the input cursor position.

Further, the device further includes:

a queue re-ordering unit, configured to before the queue output unitoutputs the enter-on-screen candidate word queue, according to the topicsituation at the input cursor position, re-order the enter-on-screencandidate word queue;

the queue output unit, configured to output a re-ordered enter-on-screencandidate word queue.

Further, the queue re-ordering unit includes:

a score calculating sub-unit, configured to according to the number ofthe keywords that fit each situation feature tag and the sum ofpossibilities of the keywords fitting each situation feature tag,determine a feature score of each situation feature tag;

a situation sorting sub-unit, configured to according to the featurescore of each situation feature tag, sort the situation feature tagsfrom high to low; and

a re-ordering sub-unit, configured to according to an order of thesituation feature tags, re-order the enter-on-screen candidate wordqueue, where the enter-on-screen candidate words in the enter-on-screencandidate word queue all have each own situation feature tag.

The present disclosure also discloses an electronic apparatus includinga memory and a processor. The memory is configured to store computerinstructions or codes, and the processor is coupled to the memory andconfigured to execute the computer instructions or codes in the memory,thereby implementing the following method:

acquiring text information at an input cursor position, the textinformation includes above text information before the input cursorand/or below text information after the input cursor,

extracting keywords from the text information;

searching through associative candidate lexicons of the keywords toobtain an enter-on-screen candidate word queue at the input cursorposition; and

outputting the enter-on-screen candidate word queue.

The present disclosure also discloses a computer program includingcomputer-readable codes, when the computer-readable codes are run in amobile terminal, the mobile terminal may execute the above-describedinput method.

The present disclosure also discloses a computer-readable medium, wherethe above-described computer program is stored.

Compared to existing technologies, embodiments of the present disclosureinclude at least the following advantages:

By acquiring the text information at the input cursor position anddetermining the enter-on-screen candidate word queue based on thekeywords in the text information, embodiments of the present disclosuremay solve the issue in existing technologies that after the input cursorchanges its position, no enter-on-screen candidate word may be providedby association because no reliable enter-on-screen entry is obtained.The disclosed method not only obtains reliable enter-on-screen candidatewords when the input cursor moves. Further, instead of simply relying onthe entry lastly entered on screen to provide the enter-on-screencandidate word queue via association, the input method may utilize thetext information before and after the input cursor as well as remotetext information to provide the enter-on-screen candidate word queue viaassociation. The method may more fully and correctly understand theinput intention of the user, thereby providing a more reliableenter-on-screen candidate word queue.

BRIEF SUMMARY OF THE DRAWINGS

FIG. 1 illustrates a flow diagram of an input method in embodiments ofthe present disclosure;

FIG. 2 illustrates a flow chart of a method for acquiring anenter-on-screen candidate word queue at an input cursor position inembodiments of the present disclosure;

FIG. 3 illustrates a flow chart of a method for establishing a languagemodel and an associative candidate lexicon of the language model inembodiments of the present disclosure;

FIG. 4 illustrates a flow chart of a method for acquiring anenter-on-screen candidate word queue at an input cursor positionaccording to an associative candidate lexicon corresponding to alanguage model in embodiments of the present disclosure;

FIG. 5 illustrate a flow chart of a method for re-ordering anenter-on-screen candidate word queue according to a topic situation atan input cursor position in embodiments of the present disclosure;

FIG. 6 illustrate a structural schematic view of an input device inembodiments of the present disclosure;

FIG. 7 illustrates a structural schematic view of a queue acquisitionunit in embodiments of the present disclosure;

FIG. 8 illustrates a structural schematic view of a model establishmentsub-unit in embodiments of the present disclosure;

FIG. 9 illustrates a structural schematic view of a queue acquisitionsub-unit in embodiments of the present disclosure;

FIG. 10 illustrates a structural schematic view of another input devicein embodiments of the present disclosure; and

FIG. 11 illustrates a structural schematic view of a queue re-orderingunit in embodiments of the present disclosure.

DETAILED DESCRIPTION

To make the above-mentioned object, features and advantages moreapparent and easier to understand, hereinafter, the present disclosurewill be made in detail with reference to the accompanying drawings andspecific embodiments.

Referring to FIG. 1, a flow diagram of an input method in embodiments ofthe present disclosure is provided.

A process where a user performs text input may be implemented bydirectly using a method described in embodiments of the presentdisclosure, or by integrating an existing method that predicts anenter-on-screen candidate word based on an entry lastly entered onscreen to give an enter-on-screen candidate word queue at an inputcursor position. The process may also be implemented by a method thatexecutes embodiments of the present disclosure under certain conditions.Specifically, when an input device detects that the input cursor isinside a text box and a stop duration of text input exceeds a timethreshold, according to the disclosed method, an enter-on-screencandidate word queue at the input cursor position may be provided. Forexample, when a user changes a position of the input cursor in the textbox to modify or add text information, the input cursor may remaininside the text box under the given circumstance, and the text input maybe paused. The method may include the following steps.

Step 101: text information at the input cursor position is acquired.

In the present step, the input device first reads the text informationat the input cursor position via a system API interface, and may use abreak point of a whole sentence where the input cursor is located or atext box boundary as a length boundary of the text information.

In particular, the text information may include above text informationlocated before the input cursor, or below text information located afterthe input cursor. Obviously, if text information exists both before andafter the input cursor, the above text information and the below textinformation may be acquired simultaneously.

Step 102: keywords are extracted from the text information.

In one embodiment, a keyword primary word table may be pre-configured.The keyword primary word table is a set including entries that may beused as keywords. It may be agreed that all entries found in the keywordprimary word table can be used as keywords, and entries not included inthe keyword primary word table are not used as keywords.

In the present step, all entries in the text information that belong tothe keyword primary word table may be extracted as keywords.Specifically, for the above text information, starting from the inputcursor position, keywords in the above text information may be traversedforwards till a break point of a whole sentence or a text box boundaryusing a dynamic planning algorithm. For the below text information,starting from the input cursor position, the keywords in the below textinformation may be traversed backwards to a break point of the wholesentence or the text box boundary using the dynamic planning algorithm.The keywords in the above text information and the keywords in the belowtext information may be stored in different sets, respectively, or maybe distinguished and annotated, such that the subsequent search ofenter-on-screen candidate word may become more convenient. Specificdescriptions are provided in subsequent embodiments.

The number of the keywords extracted from the text information accordingto the above-described method may be one or more. The keywords may allbe located in the above text information. The keywords may also all belocated in the below text information. Or, the keywords may be bothlocated in the above text information and the below text information.

Step 103: associative candidate lexicons of the keywords are searchedthrough to obtain the enter-on-screen candidate word queue at the inputcursor position.

After obtaining the keywords of the text information, correspondingassociative candidate lexicons may be searched through according to thekeywords, thereby obtaining the enter-on-screen candidate word queue atthe input cursor position.

In one method, each keyword may correspond to one associative candidatelexicon, and the enter-on-screen candidate words in each associativecandidate lexicon may be sorted according to the usage probability fromhigh to low. When inquiring the associative candidate lexicons of aplurality of keywords, repeated enter-on-screen candidate words may behighly likely found, and the enter-on-screen candidate words from eachlexicon may be sorted according to the repetition rate from high to low,thereby obtaining the enter-on-screen candidate word queue at the inputcursor position.

In another method, language models and associative candidate lexicons ofthe language models may be pre-established. The language models may beestablished based on a plurality of distance relationships between thekeywords and the input cursor, or may be established based on anapplication property that each keyword belongs to. In particular, theapplication property may be the user usage habit of the keyword, or theapplication field that the keyword belongs to, such as time, geologicallocation, and holiday wish, etc. The application property may also bethe common vocabulary that the keyword belongs to, or the topicsituation that the keyword belongs to, etc. When executing the presentstep, only one language model corresponding to the keywords extracted inthe previous step (Step 102) may be determined, and the enter-on-screencandidate word queue at the input cursor position may be obtainedaccording to the associative candidate lexicon of the determinedlanguage model. Or, a plurality of language models corresponding to theextracted keywords may be determined, and the associative candidatelexicons of the plurality of language models may be merged to eventuallydetermine the enter-on-screen candidate word queue at the input cursorposition. Specific examples are provided hereinafter with reference todescriptions of subsequent embodiments.

Obviously, other methods may also exist, which are not described indetail herein.

Step 104: the enter-on-screen candidate word queue is outputted.

After obtaining the enter-on-screen candidate word queue, theenter-on-screen candidate word queue may be outputted directly for theuser to select. Or, the enter-on-screen candidate word queue may befirst re-ordered, and the re-ordered enter-on-screen candidate wordqueue may be outputted. A plurality of re-ordering methods may beavailable.

By acquiring the text information at the input cursor position anddetermining the enter-on-screen candidate word queue based on thekeywords in the text information, embodiments of the present disclosuremay solve the issue in existing technologies that after the input cursorchanges its position, no enter-on-screen candidate word may be providedby association because no reliable enter-on-screen entry is obtained.The disclosed method not only obtains reliable enter-on-screen candidatewords when the input cursor moves. Further, instead of simply relying onthe entry lastly entered on screen to provide the enter-on-screencandidate word queue via association, the input method may utilize thetext information before and after the input cursor as well as the remotetext information to provide the enter-on-screen candidate word queue viaassociation. The method may more fully and correctly understand theinput intention of the user, thereby providing more reliableenter-on-screen candidate word queue.

In another embodiment of the present disclosure, as describedpreviously, when executing Step 103 to search through the associativecandidate lexicons of the keywords and obtain the enter-on-screencandidate word queue at the input cursor position, one methodillustrated in FIG. 2 may be used, which includes the following steps.

Step 201: a language model and an associative candidate lexicon of thelanguage model are established.

First, the present step no longer needs to be repeatedly executed eachtime an enter-on-screen candidate word queue at the input cursorposition is obtained, and may only be executed once at an initial moment

A plurality of language models may be established in the present step.In one embodiment, the plurality of language models may include a systemmodel, a user model, a perpendicular model, a common vocabulary languagemodel, and a situation model.

The system model is a language model established based on the distancerelationship between the keyword(s) and the input cursor. The usermodel, the perpendicular model, the common vocabulary language model,and the situation model are language models established based on theapplication property that the keyword belongs to. In particular, theuser model is a model established based on the user usage habit of thekeyword, and the perpendicular model is a model established based on theapplication field that the keyword belongs to, such as time, geologicallocation, and holiday wish, etc. The common vocabulary language model isa model established based on the common vocabulary that the keywordbelongs to, and the situation model is a model established based on thetopic situation that the keyword belongs to. Hereinafter, each model isintroduced, respectively.

1) The system model includes an adjacent binary language model, a remotebinary language model, and a ternary language model. The establishmentprocess of the system model and an associative candidate lexicon of thesystem model is illustrated in FIG. 3, which includes:

Step 301: receiving a training corpus; and

Step 302: extracting a training candidate word and training keywordsfrom the training corpus.

For each training corpus, keywords are extracted according to thekeyword primary word table and used as the training keywords, and anentry in a certain location of the training corpus is used as thetraining candidate word. In particular, to obtain different systemmodels after training, the distance relationship between the trainingkeywords and the training candidate word needs to include an adjacentrelationship and a non-adjacent relationship, and the number of thetraining keywords needs to be at least one.

In particular, the adjacent relationship may refer to a relationshipwhere no intervals or only stopwords exist between the training keywordand the training candidate word, and the non-adjacent relationship isjust the opposite. The stopwords refer to words or phrases that assistthe expression of the user, such as modal particles of “

(meaning ‘ah’, etc.)”, “

(pinyin input ‘le’, a common auxiliary in Chinese typically used toindicate action completion or change of state)”, and “

(meaning ‘hmm’ or ‘yup’, etc.)”, etc.

Further, in Step 303, model training is performed on the trainingcandidate word and the training keywords to obtain the language modelsand the corresponding associative candidate lexicons.

The process of the model training is similar to the training process ofthe adjacent binary language model in existing technologies, which isnot repeatedly described here.

After model training, the adjacent binary language model, the remotebinary language model, the ternary language model, and the associativecandidate lexicons of each language model may be obtained.

In particular, the adjacent binary language model is configured to solvethe binary relationship between the adjacent keyword and theenter-on-screen candidate word. The adjacent relationship may be arelationship between a keyword in the above text information and theenter-on-screen candidate word, or a relationship between theenter-on-screen candidate word and a keyword in the below textinformation. For example, in “

˜

(‘hold˜dinner party’ in Chinese)”, “

(hold)” is the enter-on-screen candidate word, and “

(dinner party)” is the keyword in the below text information. Theadjacent binary language model is a language model with a relativelyhigh certainty. The drawback of the adjacent binary language model isthat the amount of information is relatively small and the number ofcandidates that can be predicted is too large. Accordingly, it isdifficult for the user to select what he or she wants.

The remote binary language model is configured to solve the binaryrelationship between the keyword and the enter-on-screen candidate wordshowing a non-adjacent relationship (i.e., the remote relationship). Theremote relationship may be a relationship between a keyword in the abovetext information and the enter-on-screen candidate word, or may be arelationship between the enter-on-screen candidate word and a keyword inthe below text information. Different from the adjacent binary languagemodel, the remote binary language model does not require the two primarywords to be adjacent, such as a keyword “

(‘apple’ in Chinese)” and an enter-on-screen word “

(‘pear’ in Chinese)”. The remote binary language model is a reflectionof a co-existence relationship between the two primary words, whichoften represents the relevant degree between the two primary words.

The ternary language model is configured to solve a ternary relationshipbetween two keywords and one enter-on-screen candidate word, thusproviding a prediction of the enter-on-screen candidate word based onthe two keywords. The prediction relationship between the two keywordsand the enter-on-screen candidate word may be a prediction of theenter-on-screen candidate word based on the two keywords in the abovetext information, a prediction of the enter-on-screen candidate wordbased on the two keywords in the below text information, or a predictionof the enter-on-screen candidate word based on one keyword in the abovetext information and one keyword in the below text information thatsandwich the enter-on-screen candidate word. The prediction of theenter-on-screen candidate word using two keywords in the above textinformation may be, for example: “

(

)” (meaning “meeting (held) at night” in Chinese, where “

” means “meeting”, “

” means “at night”, and “(

)” means “(held)”). In this example, “

(held)” is the enter-on-screen candidate word, “

(meeting)˜

(held)” is a relatively distinct remote binary, and “

(held)”, as the enter-on-screen candidate word, may rank top. Though thebinary relationship in “

(at night)˜

(held)” is also significant, the rank of “

(held)” as the enter-on-screen candidate word may be lower than ahundred, and if only based on the adjacent binary relationship inexisting technologies, the enter-on-screen candidate word “

(held)” may be highly likely left out. Thus, a ternary language model“A˜B˜C” may be introduced for this case, where A represents a certainkeyword in the remote above text information, B represents anearby/adjacent keyword, and C represents the enter-on-screen candidateword, and a reliable enter-on-screen candidate word may be obtained. Inanother situation, if keywords “

(script)” and “

guide)” are found to exist before and after the input cursor,respectively, then “

(script)˜

(learning)˜

(guide)” may be utilized to predict the enter-on-screen candidate word “

(learning)”.

2) The user model includes user binary model, user ternary model, andremote user binary model. In particular, the user binary model isconfigured to solve the user binary relationship existing between theprevious user enter-on-screen and next user enter-on-screen. The userternary model is configured to solve the user ternary relationshipexisting in three consecutive user enter-on-screens. The remote userbinary model is configured to solve the remote binary relationshipexisting between the user enter-on-screen word within a certain distanceand the current user enter-on-screen word. The user model is a modelobtained based on the statistics of the user usage habit of the entries,and each model has a corresponding statistically counted associativecandidate lexicon.

3) The perpendicular model includes a plurality of language models inthe perpendicular field, and the plurality of language models arerelated to the classification of the fields that the entries belong to.In one example, the perpendicular model may be a system binary languagemodel in a time-related field. For example, the associative candidatelexicon of the perpendicular model corresponding to “night” includes “9o'clock, 10 o'clock, and 11 o'clock”, and the associative candidatelexicon of the perpendicular model corresponding to “Saturday” includes“morning, and afternoon”. The perpendicular model may also be a languagemodel in a position-related field, for example, the associativecandidate lexicon of the perpendicular model corresponding to “

(Wudaokou, a neighborhood in Beijing)” includes “

(Tsinghua Tongfang, the name of a company near Wudaokou),

(Richang, the name of a restaurant near Wudaokou),

(Hualian, the name of a building near Wudaokou)”, etc. The perpendicularmodel further includes language models in a quantifier-related field,language models in a recommendation-related field, language models in aninput app environment field, language models in a title-related orname-related field, and language models in a holiday-related blessingfield. Each perpendicular model is a model obtained based on statisticsof the field that the entry belongs to, and each model has acorresponding statistically counted associative candidate lexicon.

4) The common vocabulary language model (also called system vocabularylanguage model) is configured to cover a situation where an entity wordis not completely inputted, thereby fulfilling a prediction on thesuffix of the entire entry. The model is a model obtained based onstatistics of common entries. For example, if the keyword in the abovetext information is “

(literal meaning ‘laughing proudly’)”, then the enter-on-screencandidate word is “

(literal meaning ‘rivers and lake’, where “

” together forms a name of a famous Chinese novel, sometimes translatedas “The Smiling, Proud Wanderer”)”.

5) The situation model is a model established based on the topicsituation that the keyword belongs to, such as a meeting situation, adinning situation, etc. Each keyword may has one or a plurality ofsituation feature tags, each situation feature tag corresponds to onesituation model, and each situation model has its own associativecandidate lexicon.

After pre-establishing the above-described language model, Step 202 maybe executed.

In Step 202, according to a distance relationship between the keywordsand the input cursor and/or an application property that each keywordbelongs to, the language models corresponding to the keywords may bedetermined.

In the present step, according to the distance relationship between thekeywords and the input cursor, the systems model that the keywordscorrespond to may be determined. If one keyword is extracted, when thedistance relationship between the keyword and the input cursor is anadjacent relationship, the language model corresponding to thedetermined keyword is determined to be an adjacent binary languagemodel, and when the distance relationship is a non-adjacentrelationship, the language model corresponding to the keyword isdetermined to be a remote binary language model. If two keywords areextracted, the language model corresponding to the keywords isdetermined to be a ternary language model.

The language models corresponding to the keywords may also be determinedaccording to a certain application property that each keyword belongsto. For example, the user model corresponding to the keyword may bedetermined according to the user usage habit feature that the keywordbelongs to. Or, the perpendicular model corresponding to the keyword maybe determined according to the application field that the keywordbelongs to. Or, the common vocabulary language model corresponding tothe keyword may be determined according to the common vocabulary thatthe keyword belongs to. Or, the situation model corresponding to thekeyword may be determined according to the topic situation that thekeyword belongs to, etc.

A plurality of language models corresponding to the keyword may bedetermined simultaneously, such as a remote binary model, an adjacentbinary model, a ternary model, a user binary model, and a commonvocabulary language model, etc.

In Step 203, according to the associative candidate lexiconscorresponding to the language models, the enter-on-screen word queue atthe input cursor position is obtained.

For the system model, the user model, and the perpendicular model, toconveniently search through the associative candidate lexicon of thelanguage model for the enter-on-screen candidate word queue, indexessuch as a left element index and a right element index may beestablished in each associative candidate lexicon based on conventionalmethods. When the keyword is from the above text information, the leftelement index of the associative candidate lexicon of the language modelmay be utilized to search for the enter-on-screen candidate word queueat the input cursor position. When the keyword is from the lower textinformation, the right element index of the associative candidatelexicon of the language model may be utilized to search for theenter-on-screen candidate word queue at the input cursor position. Whenthe keywords are from the above and below text information,respectively, search in the two directions may be performed. Further,the query using a central element as a searching goal may be introduced.Accordingly, two secondary indexes may be established in the associativecandidate lexicon of the ternary model, such that the central elementmay be searched for in two directions. For the common vocabularylanguage model, similar to the existing associative method, theenter-on-screen candidate word queue at the input cursor position may beobtained using a prefix matching method.

When at least two language models are determined in the previous step,the process that obtains the enter-on-screen candidate word queue at theinput cursor position is illustrated in FIG. 4, which further includesthe following steps.

Step 401: the enter-on-screen candidate words in the associativecandidate lexicon of each language model are determined.

Step 402: according to the pre-determined weight of each language model,the enter-on-screen candidate words are linearly superimposed and mergedbased on the weights.

Step 403: the merged enter-on-screen candidate words based on theweights from high to low are sorted to obtain the enter-on-screencandidate word queue at the input cursor position.

By combining the plurality of language models corresponding to thekeywords, a more ideal and reliable enter-on-screen candidate word queuemay be obtained. For example, the text information at the input cursorposition may be “

,

(meaning “tomorrow I will arrive at Dalian, I want to find [cursor]”)”,and the input intent of the user is that he wants to find a playgroundnamed “

(Kingdom)”. The keywords “

(Dalian)” and “

(find)” in the above text information are extracted. In particular, thekeyword “

(Dalian)” points out the location of the user destination, therebybelonging to the perpendicular model. Further, combined with the keyword“

(find)”, the reliable enter-on-screen candidate word “

(Kingdom)” may be obtained.

In another embodiment of the present disclosure, after theenter-on-screen candidate word queue is obtained based on theabove-described method, the enter-on-screen candidate word queue may bedirectly outputted for the user to select. Or, before being outputted,the enter-on-screen candidate word queue may be re-ordered, and there-ordered enter-on-screen candidate word queue may then be outputted.

A plurality of re-ordering methods are available, and one method thatre-orders the enter-on-screen candidate word queue according to thetopic situation at the input cursor position is illustrated in FIG. 5,which may include:

Step 501, according to the number of the keywords that fit eachsituation feature tag and the sum of possibilities of the keywordsfitting each situation feature tag, determining a feature score of eachsituation feature tag.

Each keyword may fit one or a plurality of situation feature tags, eachsituation feature tag corresponds to one topic situation, and thepossibility of the keyword fitting a certain situation feature tag inthe ultimate enter-on-screen result may be obtained according tostatistics. Accordingly, the feature score feature_(i) of each situationfeature tag i may be represented as:

${{feature}_{i} = {N_{i} \times {\sum\limits_{j = 1}^{N_{i}}\; {word}_{j}}}},$

where N_(i) is the number of keywords fitting the situation feature tagi, word_(i) is the possibility that a j^(th) keyword fitting thesituation feature tag i in the ultimate enter-on-screen result, and j=1,2, . . . , N_(i).

Step 502: according to the feature score of each situation feature tag,the situation feature tags are sorted from high to low.

The topic situation corresponding to the situation feature tag with ahigher score may be the topic situation that the ultimateenter-on-screen word belongs to.

Step 503: the enter-on-screen candidate word queue is re-orderedaccording to the order of the situation feature tags.

After obtaining the enter-on-screen candidate word queue according tothe order of the situation feature tags, the enter-on-screen candidatewords in the enter-on-screen candidate word queue may each has its ownsituation feature tag. In the present step, the enter-on-screencandidate words may be re-ordered according to the order of thesituation feature tags, thereby obtaining the ultimate enter-on-screencandidate word queue.

Embodiments of the present disclosure combines a situation sensingfunction and ranks top the ideal candidate by re-ordering theenter-on-screen candidate words, thereby providing a more reliableenter-on-screen candidate word queue.

Hereinafter, specific embodiments are utilized for illustrative purpose.

For example, the text information at the input cursor position may be “

,

(meaning: we plan to [cursor] a grand party in the garden hotel atnight, where “

” means “we”, “

” means “plan to”, “

” means “at or in, etc.”, “

” means “garden”, “

means “hotel”, “

” means “night”, “

” means “[cursor]”, “

” means “grand”, and “

” means “party”)”. Based on the method in embodiments of the presentdisclosure, keywords “

(plan to)”, “

(garden)”, “

(hotel)”, “

(night)”, “

(grand)”, and “

(party)” are extracted from the text information. According to thedistance relationship between the keywords and the input cursor, thelanguage models corresponding to the keywords may be determined to beadjacent binary models, remote binary models, and ternary models. Theenter-on-screen candidate word queue at the input cursor positionobtained according to the associative candidate lexicons correspondingto the language models may be: (

)

, meaning (night) sleep; (

)

, meaning (night) date;

(

), meaning hold (party); (

)

, meaning (plan to) dispatch; (

)

, meaning (garden) door; and (

)

(

), meaning (night) hold (party). The ultimate enter-on-screen candidateword queue obtained after re-ordering the enter-on-screen candidate wordqueue may be:

(hold),

(sleep),

(date),

(door), and

(dispatch).

In the above example, two technical points support the occurrence of theenter-on-screen word “

(hold)”, including: first, the support of the understanding of the belowtext information after the input cursor, and second, the support of aprocess that triggers the enter-on-screen candidate word remotely. Acertain binary relationship exists between “

(at night)” and “

(hold)”, but the relationship is very weak, and a normal associativeprediction result that brings forward this example may be slightlyunexpected. In the below text information after the input cursor, thetext right after the input cursor is “

(grand)”, which cannot make any contribution to the prediction of thecandidate “

(hold)”. However, “

˜

(hold˜party)” is a strong remote binary language model, which has avital importance on the prediction of the candidate “

(hold)”.

Further, for example, the text information at the input cursor positionis “

,

] (meaning: went to Korea last autumn festival, this year want to go to[cursor], where “

” means “last autumn festival”, “

” means “went”, “

” means “Korea”, “

” means “this year”, and “

” means “want to go to”), and the input intent of the user is to enter “

(Japan)” on screen. Because the position of the input cursor is locatedis right after “

(want to go to)”, according to the conventional associative strategies,“

(go to)” and “

(want to go to)” may be utilized to perform search of theenter-on-screen candidate word. Based on the method in embodiments ofthe present disclosure, “

(Korea)” and “

(Japan)” are an extracted associative candidate lexicon of the remotebinary language model, and “

(go to)” and “

(Japan)” are an extracted associative candidate lexicon of the adjacentbinary language model. Under the cooperative effect of the remote binarylanguage model and adjacent binary language model, the enter-on-screencandidate word “

(Japan)” may rank top in the enter-on-screen candidate word queue, andsimilar candidate words may include “

(Thailaan)”, and “

(Singapore)”.

Further, for example, if the keyword of the above text information is “

(night)”, then according to the perpendicular model in the field of timecorresponding to the keyword and the user model, the current system timeand the time data once entered on screen in the user input history maybe utilized to perform prediction. For example, the enter-on-screencandidate word queue may be provided as {10 o'clock, 9 o'clock, and 11o'clock}. If the user choose a specific enter-on-screen candidate wordin {10 o'clock, 9 o'clock, and 11 o'clock}, the enter-on-screencandidate word queue of {half, quarter, three quarters} may besubsequently outputted.

Further, for example, if the keyword of the above text information is “

(Wudaokou)”, then according to the perpendicular model in the geologicalfield corresponding to the keyword and the user model, the geographicname input historic data in the user input history and the instantlyobtained location information may be utilized to provide nearby andrelated geographic location names as the enter-on-screen candidate wordqueue, such as {

(Qinghua Tongfang),

(Richang),

(Hualian)}. That is, in the method, after the user inputs “

(Wudaokou)”, other than “

(Chengtie)”, the enter-on-screen candidate words provided by the systemmay include “

(Qinghua Tongfang)”, which lights up the user's eyes.

Further, for example, a user wants to express a meaning of “

(meaning “autumn in hometown” in Chinese)” and the input of the firstthree words has been completed, a plurality of the user enter-on-screenforms may be found, such as “

˜

”, “

˜

˜

˜

˜

”, and “

˜

”. In this case, though association is performed on the sameenter-on-screen candidate word “

(autumn)”, the information lastly entered on screen may vary a lot, andthe last sentence-breaking method inputted by the user may be the onlyway to predict out the candidate word “

(autumn)”. However, according to the method of the present disclosure,by extracting the keyword “

(hometown)” and further referring to the language model corresponding tothe keyword “

(hometown)”, such as the common vocabulary language model, theenter-on-screen candidate word “

(autumn)” is obtained.

The method disclosed by the above-described embodiments may be used tomore fully and correctly understand the user input intent. Theabove-described embodiments may not only be applied to Chinese inputscenes, but may also be applied to other language input scenes such asEnglish, Japanese, and Korean, etc.

It should be noted that, for the method embodiments, they are expressedas a series of action combination for ease of description. But thoseskilled in the art should also understand that embodiments of thepresent disclosure are not limited to the described order of actions,because according to embodiments of the present disclosure, certainsteps may be performed using other orders or may be performedsimultaneously. Further, those skilled in the art should also understandthat, embodiments described in the specification all belong to preferredembodiments, and the actions mentioned may not be necessarily needed inthe embodiments of the present disclosure.

Referring to FIG. 6, a structural schematic view of an input device inembodiments of the present disclosure is provided.

The device may include the following units.

A text acquisition unit 601, configured to acquire text information atan input cursor position. The text information includes above textinformation located before the input cursor and/or below textinformation located after the input curser.

A keyword extraction unit 602, configured to extract keywords from thetext information.

A queue acquisition unit 603, configured to search through theassociative candidate lexicons of the keywords to obtain anenter-on-screen candidate word queue at the input cursor position.

A queue output unit 604, configured to output the enter-on-screencandidate word queue.

By acquiring the text information at the input cursor position anddetermining the enter-on-screen candidate word queue based on thekeyword in the text information, the device may solve the issue inexisting techniques that after the input cursor changes its position, noenter-on-screen candidate word may be provided by association because noreliable enter-on-screen entry is obtained. The disclosed device notonly acquires reliable enter-on-screen candidate words when the inputcursor moves. Further, instead of simply relying on the entry lastlyentered on screen to provide the enter-on-screen candidate word queuevia association, the device may utilize the text information before andafter the input cursor as well as the remote text information to providethe enter-on-screen candidate word queue via association. The device maymore fully and correctly understand the input intend of the user,thereby providing a more reliable enter-on-screen candidate word queue.

In another embodiment of the present disclosure, the text acquisitionunit 601 may specifically be configured to when the input cursor isdetected to be located inside the text box and the stop duration of textinput exceeds the time threshold, acquire the text information at theinput cursor position. The text acquisition unit 601 may furtherspecifically be configured to use the break point of the whole sentencewhere the input cursor is located or the text box boundary as the lengthboundary of the text information to acquire the text information at theinput cursor position.

In another embodiment of the present disclosure, as illustrated in FIG.7, the queue acquisition unit 603 may further include:

a model establishment sub-unit 701, configured to before a modeldetermination sub-unit 702 determines the language models correspondingto the keywords, establish the language models and the associativecandidate lexicons of the language models. The language models includethe adjacent binary language model, the remote binary language model,and the ternary language model.

The queue acquisition unit 603 further includes the model determinationsub-unit 702, configured to according to the distance relationshipbetween the keywords and the input cursor and/or the applicationproperty that each keyword belongs to, determine the language modelscorresponding to the keywords.

The queue acquisition unit 603 further include a queue acquisitionsub-unit 703, configured to search through the associative candidatelexicons of the language models to obtain the enter-on-screen candidateword queue at the input cursor position.

In particular, as illustrated in FIG. 8, the model establishmentsub-unit 701 may further include:

a collection sub-unit 801, configured to collect a training corpus;

an extraction sub-unit 802, configured to extract a training candidateword and training keywords from the training corpus, where the distancerelationship between the training keywords and the training candidateword includes an adjacent relationship and a non-adjacent relationship,and the number of training keywords is at least one; and

a training sub-unit 803, configured to perform model training on thetraining candidate word and the training keywords to obtain the languagemodels and the associative candidate lexicons of the language models.

In particular, the model determination sub-unit 702 is specificallyconfigured to, if the number of the keywords is one, when the distancerelationship between the keyword and the input cursor is the adjacentrelationship, determine the language model corresponding to the keywordas the adjacent binary language model. Further, when the distancerelationship is the non-adjacent relationship, the language modelcorresponding to the keyword is determined to be the remote binarylanguage model. If the number of the keywords is two, the language modelcorresponding to the keyword is determined to be the ternary languagemodel.

The model determination sub-unit 702 may further be configured toaccording to the user usage habit feature that the keyword belongs to,determine the user model corresponding to the keyword; or, according tothe application field that the keyword belongs to, determine theperpendicular model corresponding to the keyword; or, according to thecommon vocabulary that the keyword belongs to, determine the commonvocabulary language model corresponding to the keyword; or, according tothe topic situation that the keyword belongs to, determine the situationmodel corresponding to the keyword.

As shown in FIG. 9, the queue acquisition sub-unit 703 may furtherinclude:

a determination sub-unit 901, configured to when the number of thelanguage models is at least two, determine the enter-on-screen candidatewords in the associative candidate lexicon of each language model,respectively;

a merging sub-unit 902, configured to according to the pre-determinedweight of each language model, linearly superimpose and merge theenter-on-screen candidate words based on the weights; and

a sorting sub-unit 903, configured to sort the merged enter-on-screencandidate words based on the weights from high to low to obtain theenter-on-screen candidate word queue at the input cursor position.

Referring to FIG. 10, a structural schematic view of another inputdevice in embodiments of the present disclosure is illustrated.

Other than including the above-described text acquisition unit 601, thekeyword extraction unit 602, the queue acquisition unit 603, the queueoutput unit 604, the device further includes:

a queue re-ordering unit 1001, configured to before the queue outputunit 604 outputs the above-described enter-on-screen candidate wordqueue, re-ordering the above-described enter-on-screen candidate wordqueue according to the topic situation at the input cursor position.

The queue output unit 604 is configured to output the re-orderedenter-on-screen candidate word queue.

In particular, as shown in FIG. 11, the queue re-ordering unit 1001 mayfurther include:

a score calculating sub-unit 1101, configured to according to the numberof the keywords that fit each situation feature tag and the sum ofpossibilities of the keywords ting each situation feature tag, determinethe feature score of each situation feature tag;

a situation sorting sub-unit 1102, configured to according to thefeature score of each situation feature tag, sorting the situationfeature tags from high to low; and

a re-ordering sub-unit 1103, configured to according to the order of thesituation feature tags, re-ordering the enter-on-screen candidate wordqueue, where the enter-on-screen candidate words in the enter-on-screencandidate word queue each its own situation feature tag.

The device integrates a situation sensing function, and by sorting andre-ordering the enter-on-screen candidate words, the ideal candidateword is ranked top, and a more reliable enter-on-screen candidate wordqueue is provided.

Embodiments of the present disclosure also provide an electronicapparatus, including a memory and a processor. The memory is configuredto store computer instructions or codes, the processor is coupled to thememory and configured to execute the computer instructions or codes inthe memory, thus implementing the following method:

acquiring the text information at the input cursor position, the textinformation includes the above text information located before the inputcursor and/or the below text information located after the input cursor;

extracting the keywords from the text information;

searching through the associative candidate lexicons of the keywords toobtain the enter-on-screen candidate word queue at the input cursorposition; and

outputting the enter-on-screen candidate word queue.

The present disclosure also discloses a computer program includingcomputer-readable codes. When the computer-readable codes run at amobile terminal, the mobile terminal may execute the above-describedinput method.

A computer-readable recording medium is used to record theabove-described computer program configured to execute the disclosedinput method. The computer-readable recording medium includes anymechanism configured to store or send information in a machine (e.g.,computer) readable form. For example, a machine-readable medium includesread-only memory (ROM), random access memory (RAM), magnetic discstorage medium, optical storage medium, flash storage medium, andelectrical, optical, acoustic or other forms of propagated signals(e.g., carrier waves, infrared signals, digital signals, etc.), etc.

For device embodiments, because they are similar to the methodembodiments, the descriptions are relatively simple, and relatedportions may refer to a part of illustrations in the method embodiments.

Various embodiments of the present specification are described in aprogressive manner, each embodiment highlights its difference from otherembodiments, and similar parts between each embodiment can be referredto each other.

Those skilled in the art should understand that the embodiments of thepresent disclosure may provide methods, devices, or computer programproducts. Accordingly, embodiments of the present disclosure may adoptentire hardware embodiments, entire software embodiments, or a formcombining software embodiments and hardware embodiments. Further,embodiments of the present disclosure may adopt a form of computerprogram products implemented in one or more computer-readable storagemedia (including but not limited to magnetic disc storage, CD-ROM,optical storage, etc.) including computer-readable program codes.

Aspects of the present disclosure are described with reference toflowcharts and block diagrams of the methods, terminal units (systems)and computer program products according to embodiments of the presentdisclosure. It should be understood that computer program instructionsmay implement each process and/or block in the flowcharts and/or blockdiagrams, and combinations of process and/or block in the flowchartsand/or the block diagrams. These computer program instructions may beprovided to a processor of a general purpose computer, special purposecomputer, or other programmable data processing terminal device toproduce a machine, such that the instructions, which are executed viathe processor of the computer or other programmable data processingterminal unit, creates means for implementing functions specified in oneprocess or a plurality of processes in the flowcharts and/or one blockor a plurality of blocks in the block diagrams.

These computer program instructions may also be stored incomputer-readable medium that can direct a computer or otherprogrammable data processing terminal devices in a particular manner,such that the instructions stored in the computer-readable mediumproduce an article of manufacture including an instructional device. Theinstructional device implements functions specified in one process or aplurality of processes in the flowcharts and/or one block or a pluralityof blocks in the block diagrams.

The computer program instructions may also be loaded onto a computer, orother programmable data processing terminal units, such that thecomputer or other programmable terminal units execute a series ofoperational steps to produce a computer implemented process, such thatthe instructions executed in the computer or other programmable terminalunits provide processes for implementing the functions specified in oneprocess or a plurality of processes in the flowcharts and/or one blockor a plurality of blocks in the block diagrams.

Though the preferred embodiments of the present disclosure aredescribed, those skilled in the art can make additional alterations andmodifications to these embodiments in case of knowing the basic creativeconcepts. Therefore, the appended claims intend to be defined asincluding the preferred embodiments as well as all of the alterationsand modifications falling into the scope of the present disclosure.

Last, it should be noted that, in this document, relational terms suchas first and second, and the like may be used solely to distinguish oneentity or operation from another entity or operation without necessarilyrequiring or implying any actual such relationship or order between suchentities or operations. Further, terms “including”, “comprising”, or anyother variation thereof are intended to cover a non-exclusive inclusion,such that a process, method, article or terminal device that comprises alist of elements does not include only those elements but may includeother elements not expressly listed or inherent to such process, method,article, or terminal device. An element proceeded by “comprises . . . a”does not, without more constraints, preclude the existence of additionalidentical elements in the process, method, article, or terminal devicethat comprises the element.

Above is detailed description of an input method, device and electronicapparatus provided by the present disclosure. Specific embodiments areapplied in the document to illustrate principles and implementationmethods of the present disclosure. Illustrations of the above-describedembodiments are only used to help understand the method and core idea ofthe present disclosure. Meanwhile, those ordinarily skilled in the artmay, according to the spirit of the present disclosure, make changes tospecific embodiments and application scope. As such, the content of thespecification should not be understood to be limiting of the presentdisclosure.

1. An input method, comprising: acquiring text information at an inputcursor position, the text information including above text informationlocated before the input cursor and/or below text information locatedafter the input cursor; extracting keywords from the text information;searching through associative candidate lexicons of the keywords toobtain an enter-on-screen candidate word queue at the input cursorposition; and outputting the enter-on-screen candidate word queue. 2.The method according to claim 1, wherein acquiring the text informationat the input cursor position comprises: when the input cursor positionis detected to be inside a text box and a stop duration of text inputexceeds a time threshold, acquiring the text information at the inputcursor position.
 3. The method according to claim 1, wherein acquiringthe text information at the input cursor position comprises: using abreak point of a whole sentence where the input cursor is located or atext box boundary as a length boundary of the text information toacquire the text information at the input cursor position.
 4. The methodaccording to claim 1, wherein searching through the associativecandidate lexicons of the keywords to obtain the enter-on-screencandidate word queue at the input cursor position comprises: accordingto a distance relationship between the keywords and the input cursorand/or an application property that each keyword belongs to, determininglanguage models corresponding to the keywords; and searching throughassociative candidate lexicons of the language models to obtain theenter-on-screen candidate word queue at the input cursor position. 5.The method according to claim 4, wherein according to the distancerelationship between the keywords and the input cursor, determining thelanguage models corresponding to the keywords comprises: when a numberof keyword is one and the distance relationship between the keyword andthe input cursor is an adjacent relationship, determining the languagemodel corresponding to the keyword to be an adjacent binary languagemodel, when the distance relationship is a non-adjacent relationship,determining the language model corresponding to the keyword to be aremote binary language model; and when the number of keywords is two,determining the language model corresponding to the keyword to be aternary language model.
 6. The method according to claim 5, whereinbefore according to the distance relationship between the keywords andthe input cursor, determining the language models corresponding to thekeywords, the method further comprising: establishing language modelsand associative candidate lexicons of the language models, wherein thelanguage models include the adjacent binary language model, the remotebinary language model and the ternary language model; whereinestablishing the language models and the associative candidate lexiconsincludes: collecting a training corpus; extracting a training candidateword and training keywords from the training corpus, wherein thedistance relationship between the training keywords and the trainingcandidate word includes an adjacent relationship and a non-adjacentrelationship, and a number of the training keywords is at least one; andperforming model training on the training candidate word and thetraining keywords, thereby obtaining the language models and theassociative candidate lexicons of the language models.
 7. The methodaccording to claim 4, wherein determining the language modelscorresponding to the keywords according to the application property thateach keyword belongs to, comprises: according to a user usage habitatfeature that the keyword belongs to, determining a user modelcorresponding to the keyword; or according to an application field thatthe keyword belongs to, determining a perpendicular model correspondingto the keyword; or according to a common vocabulary that the keywordbelongs to, determining a common vocabulary language model correspondingto the keyword; or according to a topic situation that the keywordbelongs to, determining a situation model corresponding to the keyword.8. The method according to claim 4, wherein searching through theassociative candidate lexicons of the language models to obtain theenter-on-screen candidate word queue at the input cursor positioncomprises: when a number of language models is at least two, determiningthe enter-on-screen candidate words in the associative candidate lexiconof each language model, respectively; according to a pre-determinedweight of each language model, linearly superimposing and merging theenter-on-screen candidate words based on the weights; and sorting amerged enter-on-screen candidate word based on the weights from high tolow to obtain the enter-on-screen candidate word queue at the inputcursor position.
 9. The method according to claim 1, wherein beforeoutputting the enter-on-screen candidate word queue, the input methodfurther comprises: according to the topic situation at the input cursorposition, re-ordering the enter-on-screen candidate word queue; andoutputting the enter-on-screen candidate word queue includes: outputtinga re-ordered enter-on-screen candidate word queue.
 10. The methodaccording to claim 9, wherein according to the topic situation at theinput cursor position, re-ordering the enter-on-screen candidate wordqueue comprises: according to a number of the keywords that fit eachsituation feature tag and a sum of possibilities of the keywords fittingeach situation feature tag, determining a feature score of eachsituation feature tag; according to a feature score of each situationfeature tag, sorting the situation feature tags from high to low; andaccording to an order of the situation feature tags, re-ordering theenter-on-screen candidate word queue, wherein the enter-on-screencandidate words in the enter-on-screen candidate word queue have eachown situation feature tag.
 11. An input device, comprising at least oneprocessor, the at least one processor being configured for: acquiringtext information at an input cursor position, wherein the textinformation includes above text information before the input cursorand/or below text information after the input cursor; extractingkeywords from the text information; searching through associativecandidate lexicons of the keywords to obtain an enter-on-screencandidate word queue at the input cursor position; and outputting theenter-on-screen candidate word queue.
 12. The device according to claim11, wherein the at least one processor is further configured for: whenthe input cursor is detected to be inside a text box and a stop durationof text input exceeds a time threshold, acquiring the text informationat the input cursor position.
 13. The device according to claim 11,wherein the at least one processor is further configured for: using abreak point of a whole sentence where the input cursor is located or atext box boundary as a length boundary of the text information, andacquiring the text information at the input cursor position.
 14. Thedevice according to claim 11, wherein the at least one processor isfurther configured for: according to a distance relationship between thekeywords and the input cursor and/or an application property that eachkeyword belongs to, determining language models corresponding to thekeywords; and searching through associative candidate lexicons of thelanguage models to obtain the enter-on-screen candidate word queue atthe input cursor position.
 15. The device according to claim 14, whereinthe at least one processor is further configured for: when a number ofthe keywords is one, and when the distance relationship between thekeyword and the input cursor is an adjacent relationship, determiningthe language model corresponding to the keyword to be an adjacent binarylanguage model; when the distance relationship is a non-adjacentrelationship, determining the language model corresponding to thekeyword to be a remote binary language model; and when the number ofkeywords are two, determining the language model corresponding to thekeyword to be a ternary language model.
 16. The device according toclaim 14, wherein the the at least one processor is further configuredfor: before determining the language models corresponding to thekeywords, establishing the language models and the associative candidatelexicons of the language models, wherein the language models include theadjacent binary language model, the remote binary language model, andthe ternary language model; collecting a training corpus; extracting atraining candidate word and training keywords from the training corpus,wherein the distance relationship between the training keywords and thetraining candidate includes an adjacent relationship and a non-adjacentrelationship, and a number of the training keywords is at least one; andperforming model training on the training candidate word and thetraining keywords to obtain the language models and the associativecandidate lexicons of the language models.
 17. The device according toclaim 14, wherein the at least one processor is further configured for:according to a user usage habitat feature that the keyword belongs to,determining a use model corresponding to the keyword; or, according toan application field that the keyword belongs to, determining aperpendicular model corresponding to the keyword; or, according to acommon vocabulary that the keyword belongs to, determining a commonvocabulary language model corresponding to the keyword; or, according toa topic situation that the keyword belongs to, determining a situationmodel corresponding to the keyword.
 18. The device according to claim14, wherein the the at least one processor is further configured for:when a number of the language models is at least two, determining theenter-on-screen candidate words in the associative candidate lexicon ofeach language model, respectively; according to a pre-determined weightof each language model, linearly superimposing and merging theenter-on-screen candidate words based on the weights; and sorting mergedenter-on-screen candidate words based on the weights from high to low toobtain the enter-on-screen candidate word queue at the input cursorposition.
 19. The device according to claim 11, wherein the at least oneprocessor is further configured for: before outputting theenter-on-screen candidate word queue, according to the topic situationat the input cursor position, re-ordering the enter-on-screen candidateword queue; outputting a re-ordered enter-on-screen candidate wordqueue; according to a number of the keywords that fit each situationfeature tag and the sum of possibilities of the keywords fitting eachsituation feature tag, determining a feature score of each situationfeature tag; according to the feature score of each situation featuretag, sorting the situation feature tags from high to low; and accordingto an order of the situation feature tag, re-ordering theenter-on-screen candidate word queue, wherein the enter-on-screencandidate words in the enter-on-screen candidate word queue have eachown situation feature tag.
 20. (canceled)
 21. An electronic apparatus,comprising a memory and a processor, wherein the memory is configured tostore computer instructions or codes, the processor is coupled to thememory and configured to execute computer instructions or codes in thememory, thereby implementing a following method: acquiring textinformation at an input cursor position, the text information includesabove text information before the input cursor and/or below textinformation after the input cursor; extracting keywords from the textinformation; searching through associative candidate lexicons of thekeywords to obtain an enter-on-screen candidate word queue at the inputcursor position; and outputting the enter-on-screen candidate wordqueue.
 22. (canceled)
 23. (canceled)